from django.shortcuts import render
from .models import Course

# Create your views here.
def course(request):
    courses = Course.objects.select_related("teacher").only("cover_url", "title", "teacher__name").filter(is_delete=False)
    print(courses)
    return render(request, 'course/course.html', {"courses": courses})


def course_detail(request):
    return render(request, 'course/course_detail.html')
